
// /admin/product/baseTrademark/{page}/{limit}
import request from '@/utils/request'

// 获取品牌列表分页接口  /admin/product/baseTrademark/{page}/{limit}
export const reqTradeMarkList = (page, limit) => request({ url: `/admin/product/baseTrademark/${page}/${limit}`, method: "get" })


// 添加或者修改品牌  
// 添加: /admin/product/baseTrademark/save  POST { "logoUrl": "string", "tmName": "string" }
// 修改  /admin/product/baseTrademark/update  PUT { "id": 0, "logoUrl": "string", "tmName": "string" }
export const reqAddOrUpdateTradeMark = (tradeMark) => {
    if(tradeMark.id){
        return request({url:'/admin/product/baseTrademark/update', method:'put', data:tradeMark})
    }else{
        return request({url:'/admin/product/baseTrademark/save', method:'post', data:tradeMark})
    }

}

// 删除品牌的接口  /admin/product/baseTrademark/remove/{id}  delete
export const reqDeleteTradeMark = (id) => request({url:`/admin/product/baseTrademark/remove/${id}`, method: 'delete'})